package com.lagou.homework.one;

public class WorkTest {
    public static void main(String[] args) {
        //调用无参数构造方法实例化Manager
        Manager m1 = new Manager();
        m1.setName("一龙");
        m1.setId(123);
        m1.setSalary(15000);
        m1.setBonus(6000);
        m1.work();
        //调用无参数构造方法实例化Coder
        Coder c1 = new Coder();
        c1.setId(135);
        c1.setSalary(10000);
        c1.work();
        System.out.println("--------------------------------");
        //调用有参数构造方法实例化Manager
        Manager m2 = new Manager("一龙",123,15000,6000);
        m2.work();
        //调用有参数构造方法实例化Coder
        Coder c2 = new Coder(135,10000);
        c2.work();
    }
}
